<?php

use okfish\admin\modules\admin\components\PageWidget;
?>
<div class="form-wrapper">
    <div class="form-item">
        <form class="form-inline clearfix" role="form"  action="" method="get">
            <input type="hidden" name="r" value="<?=Yii::$app->request->get('r')?>">
            <input type="hidden" name="iframe" value="1">
            <input type="hidden" name="search" value="1">
            
            <button class="btn btn-info m-l" type="submit"> 查询</button>
            <input class="btn btn-info m-l" value="添加" name="search" type="button" style="width:60px;" onclick="add()">
        </form>
    </div>
    <div class="table-wrap">
        <table  data-toggle="table" class="table-item table">
            <thead>
            <tr>
			<th></th>
			<th>广告id对外提供</th>
			<th>广告组id</th>
			<th>管理员id</th>
			<th>包名</th>
			<th>应用名称</th>
			<th>广告名称</th>
			<th>广告类型</th>
			<th>广告图</th>
			<th>广告图横屏(开屏广告)</th>
			<th>广告描述</th>
			<th>广告链接</th>
			<th>打开方式</th>
			<th>安装完成马上打开</th>
			<th>状态</th>
			<th>排序|越小越排越前面</th>
			<th>添加时间</th>

                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <?php foreach($data as $k=>$vo):?>
            <tr>
			<td><?=$vo['id']?></td>
			<td><?=$vo['adsense_id']?></td>
			<td><?=$vo['group_id']?></td>
			<td><?=$vo['admin_id']?></td>
			<td><?=$vo['package_name']?></td>
			<td><?=$vo['app_name']?></td>
			<td><?=$vo['name']?></td>
			<td><?=$config_type[$vo['type']]['name']?></td>
			<td><?=$vo['thumbnail']?></td>
			<td><?=$vo['thumbnail_h']?></td>
			<td><?=$vo['desc']?></td>
			<td><?=$vo['url']?></td>
			<td><?=$config_target[$vo['target']]['name']?></td>
			<td><?=$config_need_open[$vo['need_open']]['name']?></td>
			<td><?=$config_status[$vo['status']]['name']?></td>
			<td><?=$vo['sort']?></td>
			<td><?=date('Y-m-d H:i:s',$vo['addtime'])?></td>

                <td>
                    <a href="javascript:void(0);" onclick="edit('<?=$vo['id']?>')">[编辑]</a>
                    <a href="javascript:void(0);" onclick="del('<?=$vo['id']?>')">[删除]</a>
                </td>
            </tr>
            <?php endforeach;?>
            </tbody>
        </table>
    </div>
    <?= PageWidget::widget(['page' => $page,'total_info'=>$total_info]) ?>
</div>